<template>
    <div style="border: 1px solid #ccc">
        <Toolbar style="border-bottom: 1px solid #ccc" :editor="editorRef" :defaultConfig="toolbarConfig"
            :mode="mode" />
        <Editor style="height: 500px; overflow-y: hidden" v-model="valueHtml" :defaultConfig="editorConfig" :mode="mode"
            @onCreated="handleCreated" />
    </div>
</template>

<script setup lang="ts">
import '@wangeditor/editor/dist/css/style.css'
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import { AddLog } from '../hooks/log'
const { addEdit } = AddLog()
const { editorRef,
    valueHtml,
    toolbarConfig,
    editorConfig,
    mode,
    handleCreated } = addEdit()

</script>
<style lang="scss" scoped>

</style>
